package city.spring.modules.material.service;

import city.spring.modules.material.entity.MaterialBreakageWarehouseEntity;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Service：部门报损
 *
 * @author 谢金婷
 * @date 2021-01-18 11:07:27
 */
public interface MaterialBreakageWarehouseService extends IService<MaterialBreakageWarehouseEntity> {
    String CACHE_NAME = "material_breakage_warehouse";

    /**
     * 业务处理：保存一个 <strong>部门报损</strong>
     *
     * @param entity 部门报损
     */
    void saveMaterialBreakageWarehouse(MaterialBreakageWarehouseEntity entity);

    /**
     * 业务处理：修改一个 <strong>部门报损</strong>
     *
     * @param entity 部门报损
     */
    void updateMaterialBreakageWarehouse(MaterialBreakageWarehouseEntity entity);

    /**
     * 业务处理：删除一个 <strong>部门报损</strong>
     *
     * @param primaryKey 主键ID
     */
    void deleteMaterialBreakageWarehouse(String primaryKey);

    /**
     * 业务处理：删除多个 <strong>部门报损</strong>
     *
     * @param primaryKeys 主键ID列表
     */
    void deleteMaterialBreakageWarehouse(List<String> primaryKeys);

    IPage<MaterialBreakageWarehouseEntity> listPage(Page<? extends MaterialBreakageWarehouseEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends MaterialBreakageWarehouseEntity> wrapper);

    /**
     * 报损入库确认
     * @param id
     * @param entity
     */
    void confirmWarehouse(String id,MaterialBreakageWarehouseEntity entity);
}